<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 
<meta name="keywords" content="carousel, jquery, responsive, fluid, elastic, resize, thumbnail, slider" />
<meta name="author" content="Codrops" />
<title>微评说客</title>
<link rel="stylesheet" type="text/css" href="/Public/home/style/public.css">
<link rel="stylesheet" type="text/css" href="/Public/home/style/style.css">
<link rel="stylesheet" type="text/css" href="/Public/home/style/font-awesome.css">
<script src="/Public/home/jquery/jquery-1.7.2.min.js"></script>
<style>
	html,body{ background:#f2f2f2;}
</style>
</head>

<body>
<header class="index-header">
	<h1>个人资料</h1>
    <a href="javascript:window.history.back();" class="icon-circle-arrow-left kl"></a>
</header>

<section class="my-f">
	<div class="my-f-left" style="background:url({$_SESSION['user']['headimgurl']}) top no-repeat; background-size:100%;">
    	
    </div>
    <div class="my-f-right">
    	<h4>{$_SESSION['user']['nickname']}</h4>
       
    </div>
    <div class="clears"></div>
</section>
<section class="my-f-big">
    <div class="my-f-nr">
    	<div class="my-f-block">
        	<div class="block1 block5">
            	<ul>
            		<li><span>昵称</span><p>{$_SESSION['user']['nickname']}</p><div class="clears"></div></li>
            		<li><span>性别</span><p>{$info.sex}</p><div class="clears"></div></li>
            		<li><span>地址</span><p>{$info.country}{$info.province}{$info.city}</p><div class="clears"></div></li>
            	</ul>
            </div>
        	<div class="block1 block5">
            	<ul>
            		<li><span>兴趣</span><p><input id="xq" type="text" value="{$info.xq}" placeholder="输入个人兴趣"></p><div class="clears"></div></li>
            		<li><span>个性签名</span><p><textarea id="gx" placeholder="输入个人签名">{$info.gx}</textarea></p><div class="clears"></div></li>
            	</ul>
            </div>
        </div>
    </div>
    <div class="myu-button">
    	<input type="button" value="确认保存" onclick="submitdata();">
    </div>
</section>
<div class="hh"></div>
<nav>
	<ul>
		<li>
        	<a href="/home/index/index.html" class="n1">
				<p></p>
				<span>首页</span>
			</a>
        </li>
		<li>
        	<a href="/home/index/questionnaire.html" class="n2">
				<p></p>
				<span>问卷</span>
			</a>
        </li>
		<li>
        	<a href="/home/index/post.html" class="n3">
				<p></p>
				<span>发布</span>
			</a>
        </li>
		<li>
        	<a href="/home/index/mine.html" class="n4">
				<p></p>
				<span>我的</span>
			</a>
        </li>
	</ul>
</nav>
</body>

<script type="text/javascript">
function submitdata(){

	var isfilled=true;
	if($('#xq').val()=="")isfilled=false;
	if($('#gx').val()=="")isfilled=false;
	if(isfilled){
	 $.post("/home/index/personaldata",
			  {
		 		xq:$('#xq').val(),
		 		gx:$('#gx').val()
			  },
			  function(data){
				 alert(data.msg);
					
			  });
	}
	 else{
			alert("请完善信息");	  
			  }
	
}
</script>
</html>
